package com.yl.auth.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yl.auth.entity.Caigoushenqing;
import com.yl.auth.mapper.CaigoushenqingMapper;
import com.yl.auth.model.vo.CaigoushenqingVo;
import com.yl.auth.service.CaigoushenqingService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.Date;
import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author L
 * @since 2023-07-07
 */
@Service
public class CaigoushenqingServiceImpl extends ServiceImpl<CaigoushenqingMapper, Caigoushenqing> implements CaigoushenqingService {

    @Resource
    private CaigoushenqingMapper caigoushenqingMapper;

    @Override
    public Page<CaigoushenqingVo> getList(Page<CaigoushenqingVo> page1, String ylName, String daohuoTime,Integer status) {
        return caigoushenqingMapper.getPage(page1,ylName,daohuoTime,status);
    }

    @Override
    public CaigoushenqingVo getCaiGouXiangQings(Long id) {
        return caigoushenqingMapper.getCaiGouXiangQings(id);
    }

    @Override
    public List<CaigoushenqingVo> getCaiGouXiangQingx(Long id) {
        return caigoushenqingMapper.getCaiGouXiangQingx(id);
    }

    @Override
    public void delete(Integer id) {
        caigoushenqingMapper.removCaiGou(id);
        caigoushenqingMapper.removeShiCai(id);
    }

    @Override
    public CaigoushenqingVo getStatus(Integer id) {
        return caigoushenqingMapper.getStatus(id);
    }

    @Override
    public void deleteById(Integer id) {
        caigoushenqingMapper.del(id);
    }

    @Override
    public List<CaigoushenqingVo> getShiCai() {
        return caigoushenqingMapper.getShiCai();
    }

    @Override
    public void updateStatus(Integer id) {
        caigoushenqingMapper.updateStatus(id);
    }


    @Override
    public void updateStatuss(Integer id) {
        caigoushenqingMapper.updateStatuss(id);
    }

    @Override
    public void updateStatusss(Integer id) {
        caigoushenqingMapper.updateStatusss(id);
    }
}
